%{
#include "main.hpp"
#include "frame.tab.h"
extern "C" {
int yywrap(void);
int yylex(void);
}
extern char *g_word;
%}

word "#include"[ \t]*\"[^"\n]+["\n]
%%

{word} {
	printf("get word=%s\r\n", yytext);
	g_word = yytext;
	return HEADERFILE;
}

"#include"[ \t]*<[^>\n]+[>\n] {
	printf("get word=%s\r\n", yytext);
	g_word = yytext;
	return HEADERFILE1;
}

.|\n
%%
int yywrap(void)
{
	return 1;
}
